<script setup>
import { ref } from "vue";
import GameLogin from "./components/GameLogin.vue";
import GameScene from "./components/GameScene.vue";

const isLoggedIn = ref(false);

const handleLogin = (credentials) => {
  console.log("Login attempt:", credentials);
  // 这里可以添加实际的登录逻辑
  isLoggedIn.value = true;
};
</script>

<template>
  <div class="app">
    <GameLogin v-if="!isLoggedIn" @login="handleLogin" />
    <GameScene v-else />
  </div>
</template>

<style scoped>
.app {
  width: 100vw;
  height: 100vh;
  background: #000;
  color: white;
}
</style>
